<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js</title>
    <style>
      .box{
        width: 100px;
        height: 100px;
        background-color: red;
      }
    </style>
    <script>
      alert('hello world');
      console.log('大');
      prompt('请输入验证码');//会中断代码执行
      console.log('哥');
    </script>
    <script src="test.js"></script>
  </head>
  <body>
    <div class="box">
      盒子
    </div>

    <!-- script内部推荐位置 -->
    <script>
      alert('最后是我');
      console.log('我断开了');
    </script>
  </body>
</html>